﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls;
using HealthManagement.Models;
using HealthManagement.Views;

namespace HealthManagement.Common
{
    public class PageBase : Page
    {
        public virtual void OnError(string errString)
        {
            AppData.ErrList.Add(new MessageModel { Title = "出错啦！", MsgString = errString });
            //NavigationService.Navigate(new Uri("Views/ErrorForm.xaml", UriKind.RelativeOrAbsolute));
            NavigationService.Content = new ErrorForm();
        }

        public virtual void OnNotice(string errString)
        {
            AppData.NoticeList.Add(new MessageModel { Title = "信息提示！", MsgString = errString });
            //NavigationService.Navigate(new Uri("Views/NoticeForm.xaml", UriKind.RelativeOrAbsolute));
            NavigationService.Content = new NoticeForm();
        }
    }
}
